<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<form id="empForm">
	<input type="hidden" name="id" value="${emp.id }"/>
	<div style="width:370px;margin-top:-20px;float: left;">
	<div class="form-item required">
		<label for="">姓名</label>
		<c:if test="${emp.id==null }">
			<input value="${emp.name }" data-options="required:true,validType:'length[1,6]'" type="text" class="easyui-textbox" name="name"/>
		</c:if>
		<c:if test="${emp.id!=null }">
			<input value="${emp.name }" data-options="required:true,editable:false" type="text" class="easyui-textbox" name="name"/>
		</c:if>
	</div>
	<div class="form-item required">
		<label for="">电话</label>
		<input value="${emp.tel }" data-options="required:true,validType:'length[11,11]'" type="text" class="easyui-numberbox" name="tel"/>
	</div>
	<div class="form-item required">
		<label for="">出生日期</label>
		<input value="${emp.birthday }" data-options="editable:false,required:true" class="easyui-datebox" name="birthday" style="width: 200px;"/>
	</div>
	<div class="form-item required">
		<label for="">入职时间</label>
		<input value="${emp.entryTime}" data-options="editable:false,required:true" class="easyui-datebox" name="entryTime" style="width: 200px;"/>
	</div>
	</div>
	<div class="form-item" style="margin-top:30px;height:30px;line-height:30px">
		<label for="">性别</label>
		<input type="radio" ${empty emp || emp.sex == '1'?'checked':'' } name="sex" value="1"/> 男
		<input type="radio" ${emp.sex == '0'?'checked':'' } name="sex" value="0"/> 女
	</div>
	<div class="form-item required">
		<label for="">职位</label>
		<select name="job" data-options="panelHeight:'auto'" class="easyui-combobox" style="width: 200px;">
			<c:forEach items="${role}" var="role">
				<option value="${role.name}" ${role.name==emp.job ? 'selected' : ''} >${role.name}</option>
			</c:forEach>
		</select>
	</div>
	<div class="form-item required">
		<label for="">部门</label>
		<select name="dept" data-options="panelHeight:'auto'" class="easyui-combobox" style="width: 200px;">
			<c:forEach items="${dept}" var="dept">
				<option value="${dept.id}" ${dept.name == emp.dept['name'] ? 'selected' :''}>${dept.name}</option>
			</c:forEach>
		</select>
	</div>
	<div class="form-item">
		<label for="">备注</label>
		<input readonly="readonly" value="${empty emp.remark ? '普通员工':emp.remark}" type="text" class="easyui-textbox"name="remark" style="width: 200px;"/>
	</div>
</form>
